﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ID_card
{
    class User
    {
        public Save_card[] scard = new Save_card[2];
        public CreditCard ccard;
        public int num=0;
        public void AddCard(Save_card id)
        {
            
            scard[num] = id;
            Console.WriteLine("恭喜你添加储蓄卡成功~\n");
            num++;
            return;
        }

        public void AddCard(CreditCard id)
        {
            ccard = id;
            Console.WriteLine("恭喜你添加信用卡成功~\n");
            return;
        }


        public void payMoney(int num)
        {
            double paymoney = ccard.Fee;
            Console.WriteLine("您需要还款：{0}", paymoney);
            for (int i = 0; i < num;i++)
            {       
                Save_card nscard = scard[i];
                Console.WriteLine("卡{0}余额：{1}" ,i+1,nscard.Money);
            }
            
            

        }
    }
}
